﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<Os.Domain.Lote>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	.: Lotes :.
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="headContent" runat="server">
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Lotes de Ordens de Serviço</h2>

    <table>
        <tr>
            <th></th>
            <th>
                Competência
            </th>
            <th>
                Cliente
            </th>
            <th>
                Horas Contrato
            </th>
            <th>
                Horas Excedentes
            </th>
            <th>
                Horas Utilizadas
            </th>
            <th>
                Saldo de Horas
            </th>
            <th>
                Valor Total
            </th>
        </tr>

    <% foreach (var item in Model) { %>
    
        <tr>
            <td>
                <%= Html.ActionLink("Detalhes", "Detalhes", new {  id=item.IdLote })%> 
            </td>
            <td>
                <%= Html.Encode(Html.FormataCompetencia(item.Competencia)) %>
            </td>
            <td>
                <%= Html.Encode(Html.Truncate(item.Cliente.Nome,10)) %>
            </td>
            <td>
                <%= Html.Encode(Html.FormataTempo(item.HorasContrato)) %>
            </td>
            <td>
                <%= Html.Encode(Html.FormataTempo(item.HorasExcedentes)) %>
            </td>
            <td>
                <%= Html.Encode(Html.FormataTempo(item.HorasUtilizadas)) %>
            </td>
            <td>
                <%= Html.Encode(item.SaldoHoras) %>
            </td>
            <td>
                <%= Html.Encode(item.Total) %>
            </td>
        </tr>
    
    <% } %>

    </table>
</asp:Content>